<#include "constants.ftl" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link rel="shortcut icon" href="${SERVER_SIDE_CONTEXT}/statics/favicon.ico" type="image/x-icon">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>用户登录</title>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
            border: 0;
        }

        *:focus {
            outline: none;
        }

        .bg {
            height: 100%;
            width: 100%;
            position: fixed;
            z-index: 1;
        }

        .main {
            height: 500px;
            width: 100%;
            position: absolute;
            z-index: 2;
            max-width: 1200px;
            margin-left: -600px;
            top: 50%;
            left: 50%;
            margin-top: -280px;
        }

        .main .logo {
            /*background-image: url(${SERVER_SIDE_CONTEXT}/statics/images/logo.png);*/
            /*background-repeat: no-repeat;*/
            /*background-position: left center;*/
            text-align: left;
            text-indent: 158px;
            font-family: "Microsoft Sans Serif", Arial;
            font-size: 30px;
            line-height: 38px;
            color: #FFF;
            text-decoration: none;
            width: 468px;
            height: 38px;
            margin-left: auto;
            margin-right: auto;
        }

        .main .content {
            background-image: url(${SERVER_SIDE_CONTEXT}/statics/images/pic.png);
            background-repeat: no-repeat;
            background-position: 80px center;
            height: 300px;
            margin-top: 80px;
        }

        .main .content .login-box {
            background-color: #FFF;
            float: right;
            height: 430px;
            width: 380px;
            border-radius: 3px;
            margin-top: 24px;
            margin-right: 40px;
        }

        .main .content .login-box .title {
            font-family: "Microsoft Sans Serif", Arial;
            font-size: 28px;
            line-height: 90px;
            color: #333;
            text-decoration: none;
            text-align: center;
            display: block;
            width: 100%;
        }

        .main .content .login-box .username {
            font-family: "Microsoft Sans Serif", Arial;
            font-size: 14px;
            line-height: 32px;
            color: #333;
            background-color: #FFF;
            background-image: url(${SERVER_SIDE_CONTEXT}/statics/images/user.png);
            background-repeat: no-repeat;
            background-position: 10px center;
            text-indent: 28px;
            display: block;
            width: 238px;
            height: 32px;
            border: 1px solid #5691cc;
            border-radius: 18px;
            margin-left: auto;
            margin-right: auto;
            margin-bottom: 10px;
        }

        .main .content .login-box .password {
            font-family: "Microsoft Sans Serif", Arial;
            font-size: 14px;
            line-height: 32px;
            color: #333;
            background-color: #FFF;
            background-image: url(${SERVER_SIDE_CONTEXT}/statics/images/Key.png);
            background-repeat: no-repeat;
            background-position: 10px center;
            text-indent: 28px;
            display: block;
            width: 238px;
            height: 32px;
            border: 1px solid #5691cc;
            border-radius: 18px;
            margin-left: auto;
            margin-right: auto;
            margin-bottom: 10px;
        }

        .main .content .login-box .token {
            font-family: "Microsoft Sans Serif", Arial;
            font-size: 14px;
            line-height: 32px;
            color: #333;
            background-color: #FFF;
            background-repeat: no-repeat;
            background-position: 10px center;
            text-indent: 28px;
            display: inline;
            width: 108px;
            height: 32px;
            border: 1px solid #5691cc;
            border-radius: 18px;
            margin-left: 70px;
            margin-right: auto;
            margin-bottom: 10px;
        }

        .main .content .login-box .label {
            font-family: "Microsoft Sans Serif", Arial;
            margin-left: 80px;
            font-size: 14px;
            color: #333;
            cursor: pointer;
        }

        .main .content .login-box .login_btn {
            font-family: "Microsoft Sans Serif", Arial;
            font-size: 14px;
            line-height: 32px;
            color: #FFF;
            background-color: #0f69c5;
            text-align: center;
            display: block;
            width: 238px;
            height: 32px;
            border: 1px solid #5691cc;
            border-radius: 18px;
            margin-left: auto;
            margin-right: auto;
            margin-bottom: 20px;
            margin-top: 10px;
            text-decoration: none;
            cursor: pointer;
        }

        a {
            color: cadetblue;
                text-decoration: underline;
        }

        .div_a {
            text-align: center;
            margin-bottom: 20px;
        }
    </style>

    <script type="application/javascript">
        //改变验证码事件
        function changeImg(){
            var img = document.getElementById('codeImg');
            img.src = "${SERVER_SIDE_CONTEXT}/token/getImageToken?x=" + Math.floor(Math.random()*100)
        }
    </script>
</head>

<body>
<div class="bg">
    <img src="${SERVER_SIDE_CONTEXT}/statics/images/bg.png" width="100%" height="100%"/>
</div>
<div class="main">
    <div class="logo">
        Sealer Ssm Platform
    </div>
    <div class="content">
        <div class="login-box">
            <p class="title">用户登录</p>
            <form action="login" id="form" method="post">

                <input name="username" type="text" class="username" placeholder="用户名或邮箱或手机号"/>
                <input name="password" type="password" class="password" placeholder="密码"/>
                <input type="text" name="imageTokenName" class="token"  placeholder="图形验证码"/><img id="codeImg" src="${SERVER_SIDE_CONTEXT}/token/getImageToken" onclick="changeImg()" style="cursor: pointer"><a href="javascript:void(0);" onclick="changeImg()">看不清</a>
                <label class="label">记住密码：&nbsp;&nbsp;&nbsp;<input type="checkbox" name="rememberMe" style="cursor:pointer; height: 15px; width: 15px;" checked value="true" /></label><br>
                <input type="submit" class="login_btn" value="立刻登录" />
            </form>
            <div class="div_a">还没有账号？<a href="registerPre">去注册</a>&nbsp;或&nbsp;手机号<a href="quickLoginPre">快捷登录</a></div>
            <div class="div_a"><a href="    oauth2/code/github">github登录</a>&nbsp;或&nbsp;<a href="    oauth2/code/gitee">gitee登录</a></div>
            <div class="div_a"></div>
            <span style="color:red; margin-left: 20px;">${result_message!}</span>
        </div>
    </div>
</div>
</body>
</html>
